/*
 * Copyright (c) Jiandong.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

export enum YogaOverflow {
  VISIBLE = 0,
  HIDDEN = 1,
  SCROLL = 2,
}

export function getYogaOverflowFromNumber(value: number): YogaOverflow | never {
  switch (value) {
    case 0: return YogaOverflow.VISIBLE;
    case 1: return YogaOverflow.HIDDEN;
    case 2: return YogaOverflow.SCROLL;
    default: throw new Error("Unknown enum value: " + value);
  }
}

